VERSION 5.00
Object = "{19BD1EA6-6E36-45BA-AEBD-BCF3093017CC}#11.0#0"; "GorditoButton.ocx"
Begin VB.Form frmCambiarMesa 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   4260
   ClientLeft      =   -15
   ClientTop       =   270
   ClientWidth     =   7335
   BeginProperty Font 
      Name            =   "Book Antiqua"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmCambiarMesa.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4260
   ScaleWidth      =   7335
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame fraContenedor 
      BackColor       =   &H00FFC0C0&
      BorderStyle     =   0  'None
      ClipControls    =   0   'False
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   4335
      Left            =   -30
      TabIndex        =   0
      Top             =   420
      Width           =   7875
      Begin VB.ComboBox cboMesaOrigen 
         BeginProperty Font 
            Name            =   "Book Antiqua"
            Size            =   36
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   990
         Left            =   3150
         Style           =   2  'Dropdown List
         TabIndex        =   5
         Top             =   930
         Width           =   1935
      End
      Begin VB.ComboBox cboMesaDestino 
         BeginProperty Font 
            Name            =   "Book Antiqua"
            Size            =   36
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   990
         Left            =   3150
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   2040
         Width           =   1935
      End
      Begin VB.Frame frParametros 
         BackColor       =   &H80000014&
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   615
         Left            =   -30
         TabIndex        =   1
         Top             =   0
         Width           =   15255
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            BackStyle       =   0  'Transparent
            Caption         =   "Seleccionar Mesas"
            BeginProperty Font 
               Name            =   "Book Antiqua"
               Size            =   20.25
               Charset         =   0
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   420
            Left            =   120
            TabIndex        =   2
            Top             =   120
            Width           =   3450
         End
      End
      Begin GorditoButton.Boton cmdCambiar 
         Height          =   1065
         Left            =   5580
         TabIndex        =   8
         Top             =   900
         Width           =   1155
         _ExtentX        =   2037
         _ExtentY        =   1879
         Caption         =   "OK"
         BackColor       =   12648384
         ResalteColor    =   12648384
         IntensityColor  =   4
         ButtonStyle     =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Book Antiqua"
            Size            =   20.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   16777215
      End
      Begin GorditoButton.Boton cmdSalir 
         Height          =   1065
         Left            =   5580
         TabIndex        =   9
         Top             =   2070
         Width           =   1155
         _ExtentX        =   2037
         _ExtentY        =   1879
         Caption         =   "Exit"
         BackColor       =   12648384
         ResalteColor    =   12648384
         IntensityColor  =   4
         ButtonStyle     =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Book Antiqua"
            Size            =   20.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   16777215
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Mesa Destino :"
         BeginProperty Font 
            Name            =   "Book Antiqua"
            Size            =   20.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00808080&
         Height          =   480
         Left            =   360
         TabIndex        =   7
         Top             =   2250
         Width           =   2670
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Mesa Origen  :"
         BeginProperty Font 
            Name            =   "Book Antiqua"
            Size            =   20.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00808080&
         Height          =   480
         Left            =   390
         TabIndex        =   6
         Top             =   1140
         Width           =   2640
      End
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Cambiar Mesa"
      BeginProperty Font 
         Name            =   "Book Antiqua"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   480
      Left            =   60
      TabIndex        =   3
      Top             =   -30
      Width           =   2640
   End
End
Attribute VB_Name = "frmCambiarMesa"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private mvarlistaMesasOcupadas As Collection
Private mvarlistaMesasLibres As Collection
Private control As New cmesa

Private Sub cmdCambiar_Click()
Dim bMesaOrigen As bMesa
Dim bMesaDestino As bMesa
If Me.cboMesaDestino.ListIndex >= 0 Then Set bMesaDestino = mvarlistaMesasLibres.Item(cboMesaDestino.ListIndex + 1)
If Me.cboMesaOrigen.ListIndex >= 0 Then Set bMesaOrigen = mvarlistaMesasOcupadas.Item(cboMesaOrigen.ListIndex + 1)
If bMesaOrigen Is Nothing Then
    utilMensaje.muestraMensaje SeleccioneMesaOrigen
    Exit Sub
End If
If bMesaDestino Is Nothing Then
    utilMensaje.muestraMensaje SeleccioneMesaDestino
    Exit Sub
End If
control.cambiarMesa bMesaOrigen, bMesaDestino
Unload Me
End Sub

Private Sub cmdSalir_Click()
Me.Hide
End Sub

Private Sub Form_Load()
    Call p_CentrarForm(Me, frmTablero)
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Set mvarlistaMesasOcupadas = Nothing
    Set mvarlistaMesasLibres = Nothing
End Sub


Public Property Get listaMesasOcupadas() As Collection
    Set listaMesasOcupadas = mvarlistaMesasOcupadas
End Property

Public Property Set listaMesasOcupadas(listaMesasOcupadas As Collection)
    Set mvarlistaMesasOcupadas = listaMesasOcupadas
    llenarListaOcupadas
End Property

Public Property Get listaMesasLibres() As Collection
    Set listaMesasLibres = mvarlistaMesasLibres
End Property

Public Property Set listaMesasLibres(listaMesasLibres As Collection)
    Set mvarlistaMesasLibres = listaMesasLibres
    llenarListaLibres
End Property

Private Sub llenarListaLibres()
Dim i As Integer
Dim bMesa As bMesa
Me.cboMesaDestino.Clear
For i = 1 To mvarlistaMesasLibres.Count
    Set bMesa = mvarlistaMesasLibres.Item(i)
    Me.cboMesaDestino.AddItem UCase(bMesa.sDescripcion)
Next
End Sub
Private Sub llenarListaOcupadas()
Dim i As Integer
Dim bMesa As bMesa
Me.cboMesaOrigen.Clear
For i = 1 To mvarlistaMesasOcupadas.Count
    Set bMesa = mvarlistaMesasOcupadas.Item(i)
    Me.cboMesaOrigen.AddItem UCase(bMesa.sDescripcion)
Next
End Sub


